package com.ckk.configclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigController {
    // 注入远程仓库中的配置属性对应的值
    @Value("${username}")
    String username;

    @Value("${school}")
    String school;

    @Value("${action}")
    String action;

    @RequestMapping(value = "/getUsername")
    public String getUsername(){
        return "获取配置信息：" + username;
//                school + "action" +action;
    }
}
